﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;

public class levelmanager : MonoBehaviour {
    public int currentSceneId;
    public bool isSuccess;
    public bool isGameOver;
    public void levelJump()
    {
        currentSceneId = SceneManager.sceneCount;
        switch (currentSceneId)
        {
            case 0:
                
                break;
            case 1:
                StartButton(2);
                break;
            case 2:
                if (isSuccess)
                    StartButton(3);
                if (isGameOver)
                    StartButton(4);
                break;
            case 3:
                
                StartButton(0);
                break;
            case 4:
                EndAnimaPlay();
                StartButton(0);
                break;
            default:

                break;
        }
    }
    public void EndAnimaPlay()
    {

    }
    public void StartButton(int index)
    {
        SceneManager.LoadScene(index);
    }

}
